<?php 
$err = urldecode(@$_GET["err"]);

?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<meta name="description" content="Persistent Digital Archives and Library System" />
<title>PeDALS Web Administration</title>
<link rel="shortcut icon" href="images/favicon.ico" />
<link href="includes/style.css" rel="stylesheet" type="text/css" />
</head>
<body>
<?php include 'includes\header.php'; ?>
<script language="javascript">
/*Slawomir Mitak April 1 2009
Function add Element create on-the-fly new DIV switch holds everything that we want to put on our website
Function remove element delete one element from our div
*/
var nextNumber = 0;

function addElement() {
  nextNumber += 1;  
  var newDiv = document.createElement('div');
  var divId = 'input'+nextNumber+'Div';
  newDiv.setAttribute('id',divId);
  newDiv.innerHTML = '<tr><td style=\"padding: 5px;\"><input type=\"text\" name=\"info_input[]\" size=\"30\"></td><td style=\"padding: 5px;\"><input type=\"text\" name=\"data_input[]\" size=\"50\"></td><td><a href=\"javascript:;\" onclick=\"removeElement(\''+divId+'\');\" style=\"text-decoration: none;\">&nbsp;<img border=\"0\" src=\"images/delete.png\"/></a></td></tr>'; 
  document.getElementById('contentDiv').appendChild(newDiv);
}
function removeElement(divNum) {
    document.getElementById('contentDiv').removeChild(document.getElementById(divNum));
}
</script>
<div id="breadcrumb-container">
  <div id="breadcrumb"><a href="index.html" title="Home page">Home</a> / <a href="provSummary.php" title="Provenances">Provenances</a> / Create Provenance</div>
  <div id="breadcrumb-side">
  </div>
  <div class="clear"></div>
</div>
<!-- 
  CONTENT
  -->
<div id="content-container">
  <!-- 
	SIDE COLUMN
	-->
  <div id="content-side">
    <ul class="link-list-vertical">
      <li><a href="provSummary.php" title="View a list of all Provenances in PeDALS.">List Provenances</a></li>
      <li><a href="provNew.php" title="Add an Provenance to PeDALS.">Add Provenance</a></li>
    </ul>
  </div>
  <!-- 
	MAIN COLUMN
	-->
  <div id="content"><a name="maincontent" id="maincontent"></a>
<!-- Need to add something here. Obviously, we only want to add handling so this displays only if successful.-->
<h3>The provenance has been submitted.</h3>
<?php 
if ($err == "1") {
	echo "One or more variant names were not added due to an error.<br.>View provenance detail to see what got created.";
	die;
}
?>
<p><a href="provDetail.php?prov=<?php echo $provId; ?>" title="View provenance detail">View provenance detail</a></p>
<?php include 'includes\footer.php'; ?>
  </div>
</div>
</body>
</html>
